package com.han.spring.core.annotation_di;
/**
* @author hanpeng
* @version 创建时间：2020年7月8日 上午9:19:38
* @ClassName 类名称
* @Description 类描述
*/

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;

public class House {
	@Autowired(required=true)
	private Han han;
	@Autowired
	private Map<String, Han> map;
	
	/*@Resource
    private ApplicationContext context;*/
	@Autowired
    private ApplicationContext context;
	
	@Value(value="${key}")
	private String name;

	public Han getHan() {
		return han;
	}

	public void setHan(Han han) {
		this.han = han;
	}
	

	public Map<String, Han> getMap() {
		return map;
	}

	public void setMap(Map<String, Han> map) {
		this.map = map;
	}
	

	public ApplicationContext getContext() {
		return context;
	}

	public void setContext(ApplicationContext context) {
		this.context = context;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "House [han=" + han + "]";
	}

	
	
	
}
